<template>
	<view class="bg">

		<view class="top">
			<image src="../../static/index/kefut.png" mode=""></image>
		</view>
		<view class="phone">
			<view class="text">
				<text>客服联系方式：</text>
				<text style="color: #FE3710;">{{phone}}</text>
			</view>
			<!-- #ifdef MP-WEIXIN -->
			<button open-type='contact' class="btn">
				微信客服
			</button>
			<!-- #endif -->

			<view class="btn" @click="copyText()">
				<text>拨打电话</text>
			</view>

		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				phone: '18981114998',
			}
		},
		onLoad() {

		},
		methods: {
			copyText() {

				uni.makePhoneCall({
					phoneNumber: this.phone, //电话号码
					success: function(e) {
						console.log(e);
					},
					fail: function(e) {
						console.log(e);

					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.bg {
		width: 100%;
		height: 100vh;
		padding: 20rpx;
		box-sizing: border-box;

		.top {
			width: 100%;
			height: 330rpx;

			image {
				width: 100%;
				height: 100%;
			}

		}

		.phone {
			width: 100%;
			height: 100rpx;
			margin-top: 20rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.text {
				font-size: 30rpx;
				display: flex;
				flex-direction: column;

			}

			.btn {
				width: 200rpx;
				height: 60%;
				background-color: #2C93E5;
				color: #fff;
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 32rpx;
				border-radius: 50rpx;
			}
		}
	}
</style>